Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.0 #72

Merged
merged 22 commits into from
Jul 16, 2016
Merged

0.9.0 #72

merged 22 commits into from
Jul 16, 2016

Conversation

maciejhirsz
Copy link
Owner

Closes #70, closes #68, closes #38

@maciejhirsz maciejhirsz added this to the 0.9.0 milestone Jul 15, 2016
@Mark-Simulacrum
Copy link

May be worth updating the comment at the end of the README, since it currently states that Serde parsing to a struct is faster--I don't believe that is the case anymore.

@maciejhirsz
Copy link
Owner Author

maciejhirsz commented Jul 15, 2016

It depends.

  • canada.json is peculiar because it has a vector of two-element vectors (points). Parsing to structs will win here because it can read the point as two f64 on stack, while vector always has to make a heap allocation.
  • citm_catalog.json is slightly less peculiar, but it contains one giant object that serves as an associative array of id => proper object mapping. I haven't looked into how serde is representing it exactly, but since the ids are in order I guess a BTreeMap with u64 keys would be pretty fast.
  • twitter.json is just json objects in array, this is most similar to what the log benchmark is testing. That said, the log benchmark doesn't have any difficult things, strings are short and I can avoid heap allocation on most of them, this json has a bunch of long unicode strings, so the gap is smaller.

That said, yeah, rewording might be in order.

@maciejhirsz
Copy link
Owner Author

test json_rust_stringify                 ... bench:       1,354 ns/iter (+/- 497) = 446 MB/s

😮

@maciejhirsz maciejhirsz merged commit ad02a2f into master Jul 16, 2016
@maciejhirsz maciejhirsz deleted the 0.9.0 branch July 16, 2016 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants